package com.learning.platform.dto;

import com.learning.platform.enums.Difficulty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import jakarta.validation.constraints.DecimalMin;

import java.math.BigDecimal;

public class CourseRequest {
    
    @NotBlank(message = "课程标题不能为空")
    @Size(max = 200, message = "课程标题不能超过200字符")
    private String title;
    
    @Size(max = 2000, message = "课程描述不能超过2000字符")
    private String description;
    
    private String coverUrl;
    
    private Long categoryId;
    
    @DecimalMin(value = "0.0", message = "课程价格不能为负数")
    private BigDecimal price = BigDecimal.ZERO;
    
    private Difficulty difficulty = Difficulty.BEGINNER;
    
    public String getTitle() { return title; }
    public void setTitle(String title) { this.title = title; }
    
    public String getDescription() { return description; }
    public void setDescription(String description) { this.description = description; }
    
    public String getCoverUrl() { return coverUrl; }
    public void setCoverUrl(String coverUrl) { this.coverUrl = coverUrl; }
    
    public Long getCategoryId() { return categoryId; }
    public void setCategoryId(Long categoryId) { this.categoryId = categoryId; }
    
    public BigDecimal getPrice() { return price; }
    public void setPrice(BigDecimal price) { this.price = price; }
    
    public Difficulty getDifficulty() { return difficulty; }
    public void setDifficulty(Difficulty difficulty) { this.difficulty = difficulty; }
}




